<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			*{
				padding: 0;
				margin: 0;
				
			}
			#hd{
				width: 200px;
				height: 300px;
				background: blue;
			}
		</style>
		<script src='jquery-3.4.1.js'></script>
		<script src='jquery.easing.1.3.js'></script>
		<script>
			$(function(){
				var age=prompt('请输入年龄，如果成年了，就提交表单');
				if(age>=18){
					//触发form标签的submit事件
					$("#biaodan").trigger('submit');
				}
			})
		</script>
	</head>
	<body>
		<form action="hd.php" method='post' id='biaodan'>
			用户名：<input type="text" />
			<br /><br /><br />
			密码：<input type="password" />
			<br /><br /><br />
			<input type="submit" value='提交数据'/>
		</form>
	</body>
</html>
